class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: G = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.txt = txt

a = A("a")
f = B("f")
c = C("c")
l = D("l")
b = E("b")
i = F("i")
h = G("h")
e = H("e")
j = H("j")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.x: E = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.txt = txt

a = A("a")
f = B("f")
c = C("c")
l = D("l")
b = E("b")
i = F("i")
h = G("h")
e = H("e")
j = H("j")

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