class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.o: B = None
        self.r: F = None
        self.x: A = None
        self.w: D = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: E = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

l = A("l")
e = B("e")
f = C("f")
c = D("c")
j = E("j")
g = F("g")
n = G("n")
i = D("i")

l.t = i
l.r = g
l.y = f
e.x = g
e.p = l
e.t = f
e.o = f
f.s = n
c.s = f
c.v = i
c.w = i
c.o = e
c.r = g
c.x = l
c.p = j
j.y = g
j.t = g
j.x = l
g.s = l
g.p = l
g.y = l
n.r = g
n.y = g
n.s = j
n.v = f
i.s = f
i.v = c
i.w = c
i.o = e
i.r = g
i.x = l
i.p = j
assert j.y.s.t.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.t: C = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: D = None
        self.o: B = None
        self.r: F = None
        self.x: A = None
        self.w: D = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: E = None
        self.v: C = None
        self.y: F = None
        self.txt = txt

l = A("l")
e = B("e")
f = C("f")
c = D("c")
j = E("j")
g = F("g")
n = G("n")
i = D("i")

l.t = i
l.r = g
l.y = f
e.x = g
e.p = l
e.t = f
e.o = f
f.s = n
c.s = f
c.v = i
c.w = i
c.o = e
c.r = g
c.x = l
c.p = j
j.y = g
j.t = g
j.x = l
g.s = l
g.p = l
g.y = l
n.r = g
n.y = g
n.s = j
n.v = f
i.s = f
i.v = c
i.w = c
i.o = e
i.r = g
i.x = l
i.p = j
assert j.y.s.t.o.x.txt == "g"