class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.o: D = None
        self.u: D = None
        self.p: A = None
        self.t: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.txt = txt

d = A("d")
n = B("n")
f = C("f")
c = D("c")
k = E("k")
l = F("l")
b = G("b")
i = A("i")
a = B("a")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: B = None
        self.txt = txt

d = A("d")
n = B("n")
f = C("f")
c = D("c")
k = E("k")
l = F("l")
b = G("b")
i = A("i")
a = B("a")
j = E("j")

d.w = n
d.q = i
d.p = i
d.o = c
d.u = c
d.t = a
d.x = b
n.q = f
f.z = b
f.y = b
f.w = b
f.s = i
c.y = b
c.p = b
c.t = l
k.x = c
l.y = c
l.s = n
l.v = f
b.x = l
b.o = n
i.w = n
i.q = d
i.p = d
i.o = c
i.u = c
i.t = a
i.x = b
a.q = f
j.x = c
assert j.x.y.o.q.y.txt == "b"