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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

g = A("g")
d = B("d")
j = C("j")
c = D("c")
h = E("h")
b = F("b")
a = B("a")
f = D("f")
i = F("i")

g.w = a
g.x = i
g.o = d
g.u = h
d.o = c
d.s = j
d.p = j
d.r = a
d.x = a
d.w = h
j.o = h
j.y = g
c.t = h
c.z = d
c.x = a
c.u = g
c.w = i
c.q = f
h.p = i
h.q = i
h.x = f
b.y = d
b.o = j
a.o = c
a.s = j
a.p = j
a.r = d
a.x = d
a.w = h
f.t = h
f.z = a
f.x = a
f.u = g
f.w = b
f.q = c
i.y = d
i.o = j
assert a.o.w.o.o.p.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.o: B = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

g = A("g")
d = B("d")
j = C("j")
c = D("c")
h = E("h")
b = F("b")
a = B("a")
f = D("f")
i = F("i")

g.w = a
g.x = i
g.o = d
g.u = h
d.o = c
d.s = j
d.p = j
d.r = a
d.x = a
d.w = h
j.o = h
j.y = g
c.t = h
c.z = d
c.x = a
c.u = g
c.w = i
c.q = f
h.p = i
h.q = i
h.x = f
b.y = d
b.o = j
a.o = c
a.s = j
a.p = j
a.r = d
a.x = d
a.w = h
f.t = h
f.z = a
f.x = a
f.u = g
f.w = b
f.q = c
i.y = d
i.o = j
assert a.o.w.o.o.p.y.x.txt == "a"