class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.t: G = None
        self.z: B = None
        self.txt = txt

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

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

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

f = A("f")
n = B("n")
m = C("m")
b = D("b")
h = E("h")
i = F("i")
k = G("k")
l = D("l")
c = G("c")

f.r = i
f.t = i
f.q = i
f.s = b
n.x = i
n.y = b
m.y = h
m.o = c
m.u = c
m.t = n
m.x = f
b.v = f
b.s = i
b.t = c
b.z = n
h.r = i
h.z = l
h.o = m
h.x = m
h.q = f
i.x = c
i.u = f
i.t = n
i.q = n
i.s = l
k.w = h
k.o = h
k.r = b
k.y = m
k.q = m
k.u = c
l.v = f
l.s = i
l.t = k
l.z = n
c.w = h
c.o = h
c.r = l
c.y = m
c.q = m
c.u = k
assert h.r.u.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.t: G = None
        self.z: B = None
        self.txt = txt

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

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

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

f = A("f")
n = B("n")
m = C("m")
b = D("b")
h = E("h")
i = F("i")
k = G("k")
l = D("l")
c = G("c")

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