class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.q: H = None
        self.z: H = None
        self.x: F = None
        self.y: G = None
        self.o: B = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.q: H = None
        self.o: B = None
        self.v: I = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.s: A = None
        self.t: F = None
        self.p: A = None
        self.x: H = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.p: H = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: E = None
        self.s: H = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.v: B = None
        self.q: C = None
        self.r: E = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.q: H = None
        self.o: B = None
        self.v: I = None
        self.s: F = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: F = None
        self.t: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.s: A = None
        self.t: F = None
        self.p: A = None
        self.x: H = None
        self.w: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.p: H = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: E = None
        self.s: H = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: E = None
        self.v: B = None
        self.q: C = None
        self.r: E = None
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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