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

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.z: G = None
        self.w: A = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: E = None
        self.t: H = None
        self.o: E = None
        self.y: F = None
        self.s: D = None
        self.q: H = None
        self.txt = txt

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

m = A("m")
d = B("d")
l = C("l")
g = D("g")
c = E("c")
i = F("i")
k = G("k")
f = H("f")
n = D("n")

m.u = k
m.x = k
m.p = l
m.z = c
m.v = c
d.v = f
l.x = f
g.x = n
g.u = d
g.t = i
g.v = f
c.v = k
c.z = k
c.r = m
c.w = m
c.x = m
c.o = l
i.w = d
k.v = m
k.p = c
k.o = c
k.t = f
k.q = f
k.y = i
k.s = n
f.u = m
f.x = c
n.x = g
n.u = d
n.t = i
n.v = f
assert g.v.x.r.u.q.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: G = None
        self.p: C = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.z: G = None
        self.w: A = None
        self.x: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: E = None
        self.t: H = None
        self.o: E = None
        self.y: F = None
        self.s: D = None
        self.q: H = None
        self.txt = txt

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

m = A("m")
d = B("d")
l = C("l")
g = D("g")
c = E("c")
i = F("i")
k = G("k")
f = H("f")
n = D("n")

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