class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: C = None
        self.x: H = None
        self.r: A = None
        self.t: C = None
        self.z: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.t: B = None
        self.r: E = None
        self.o: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

k = A("k")
f = B("f")
g = C("g")
b = D("b")
h = E("h")
j = F("j")
m = G("m")
n = H("n")
c = A("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.t: B = None
        self.r: E = None
        self.o: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

k = A("k")
f = B("f")
g = C("g")
b = D("b")
h = E("h")
j = F("j")
m = G("m")
n = H("n")
c = A("c")

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