class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.u: G = None
        self.s: D = None
        self.v: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.w: D = None
        self.v: H = None
        self.o: C = None
        self.s: I = None
        self.z: H = None
        self.r: H = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.p: A = None
        self.o: F = None
        self.q: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: G = None
        self.p: B = None
        self.z: D = None
        self.t: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.q: D = None
        self.s: D = None
        self.w: I = None
        self.y: A = None
        self.p: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.u: D = None
        self.r: I = None
        self.q: F = None
        self.s: C = None
        self.t: A = None
        self.w: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
a = D("a")
f = E("f")
b = F("b")
c = G("c")
h = H("h")
k = I("k")

g.x = n
g.p = k
g.u = c
g.r = c
g.s = a
g.v = b
e.p = g
e.t = a
e.w = a
e.v = h
e.z = h
e.r = h
e.q = h
e.o = n
e.s = k
n.o = e
n.y = e
n.u = c
n.w = f
a.x = k
a.y = b
a.o = b
a.p = g
a.q = f
a.r = n
f.w = e
f.p = e
f.r = c
f.z = a
f.t = n
f.y = g
b.r = a
b.q = a
b.s = a
b.z = f
b.w = k
b.y = g
b.p = e
b.t = n
c.y = g
c.t = g
c.p = a
c.u = a
c.r = k
c.z = k
c.q = b
c.s = n
c.w = e
h.w = n
k.x = g
k.z = g
k.r = f
k.q = e
assert e.o.u.u.q.r.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: I = None
        self.u: G = None
        self.s: D = None
        self.v: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: D = None
        self.w: D = None
        self.v: H = None
        self.o: C = None
        self.s: I = None
        self.z: H = None
        self.r: H = None
        self.q: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.p: A = None
        self.o: F = None
        self.q: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: G = None
        self.p: B = None
        self.z: D = None
        self.t: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.q: D = None
        self.s: D = None
        self.w: I = None
        self.y: A = None
        self.p: B = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: D = None
        self.u: D = None
        self.r: I = None
        self.q: F = None
        self.s: C = None
        self.t: A = None
        self.w: B = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: E = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

g = A("g")
e = B("e")
n = C("n")
a = D("a")
f = E("f")
b = F("b")
c = G("c")
h = H("h")
k = I("k")

g.x = n
g.p = k
g.u = c
g.r = c
g.s = a
g.v = b
e.p = g
e.t = a
e.w = a
e.v = h
e.z = h
e.r = h
e.q = h
e.o = n
e.s = k
n.o = e
n.y = e
n.u = c
n.w = f
a.x = k
a.y = b
a.o = b
a.p = g
a.q = f
a.r = n
f.w = e
f.p = e
f.r = c
f.z = a
f.t = n
f.y = g
b.r = a
b.q = a
b.s = a
b.z = f
b.w = k
b.y = g
b.p = e
b.t = n
c.y = g
c.t = g
c.p = a
c.u = a
c.r = k
c.z = k
c.q = b
c.s = n
c.w = e
h.w = n
k.x = g
k.z = g
k.r = f
k.q = e
assert e.o.u.u.q.r.q.z.txt == "f"