class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: F = None
        self.o: H = None
        self.w: G = None
        self.p: I = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.q: C = None
        self.s: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: F = None
        self.o: H = None
        self.w: G = None
        self.p: I = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: G = None
        self.q: C = None
        self.s: G = None
        self.z: B = None
        self.r: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

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