class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.w: B = None
        self.q: B = None
        self.o: C = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.y: E = None
        self.x: E = None
        self.o: A = None
        self.s: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.o: C = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

j.x = g
j.q = g
j.y = e
j.u = e
j.w = b
j.o = l
j.z = l
b.w = i
b.u = g
b.y = c
b.x = c
b.s = c
b.o = j
b.z = d
l.v = c
l.x = e
d.p = e
d.u = c
d.x = c
d.o = l
d.q = i
c.x = g
c.s = l
i.t = c
i.w = d
e.v = j
g.w = i
g.u = b
g.y = c
g.x = c
g.s = c
g.o = j
g.z = d
assert d.p.v.w.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: G = None
        self.w: B = None
        self.q: B = None
        self.o: C = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: B = None
        self.y: E = None
        self.x: E = None
        self.o: A = None
        self.s: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.o: C = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

j.x = g
j.q = g
j.y = e
j.u = e
j.w = b
j.o = l
j.z = l
b.w = i
b.u = g
b.y = c
b.x = c
b.s = c
b.o = j
b.z = d
l.v = c
l.x = e
d.p = e
d.u = c
d.x = c
d.o = l
d.q = i
c.x = g
c.s = l
i.t = c
i.w = d
e.v = j
g.w = i
g.u = b
g.y = c
g.x = c
g.s = c
g.o = j
g.z = d
assert d.p.v.w.x.txt == "c"