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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.v: A = None
        self.w: F = None
        self.o: B = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.v: A = None
        self.w: F = None
        self.o: B = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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