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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.y: G = None
        self.v: C = None
        self.u: B = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.s: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: E = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: A = None
        self.y: G = None
        self.v: C = None
        self.u: B = None
        self.q: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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